package org.jeecg.controller;

import org.jeecg.domain.OrdersServe;
import org.jeecg.domain.dto.OrdersServeDto;
import org.jeecg.service.OrdersServeService;
import org.jeecg.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/task")
public class TaskController {
    @Autowired
    private OrdersServeService ordersServeService;

    //任务列表分页+条件查询
    @GetMapping("/taskList")
    public ResponseResult taskList(OrdersServeDto orderDto){
        return ordersServeService.orderList(orderDto);
    }

//    根据任务id查询任务状态
    @PostMapping("/findTaskStatus")
    public ResponseResult findTaskStatus(String id){
        return ordersServeService.findTaskStatus(id);
    }

//    根据id查任务信息
    @PostMapping("/findTask")
    public ResponseResult findTask(String id){
        return ordersServeService.findTask(id);
    }

//    订单取消
    @PostMapping("/qux")
    public ResponseResult qux(String id){
        return ordersServeService.qux(id);
    }
}
